<h3> Filter by date:</h3>
<?php
echo $this->Form->create('Post',array('action'=>'allfilters'));
?>
 <!-- import the js and css files to be able to use the datepicker -->
<?php echo $this->Html->script('jquery-1.4.2.min.js'); ?>
<?php echo $this->Html->script('jquery-ui-1.8.4.custom.min.js'); ?>
<?php echo $this->Html->css('start/jquery-ui-1.8.4.custom.css'); ?>

<head>

 <!-- identify datepicker before calling it -->	
<script type="text/javascript">

			$(function(){

				// Datepicker
				$('#datepicker').datepicker({
					inline: true
				});

			});
		</script>

</head>


<script type="text/javascript">

			$(function(){

				// Datepicker
				$('#datepicker1').datepicker({
					inline: true
				});

			});
		</script>

</head>

<?php
/*
 *Description of the line echo $this->Form->input('Start date (dd/mm/yyyy)', array('type' => 'text',
                                            'id' => 'datepicker','style' => 'width:150px'));
 *
 *adding datepicker to the textbox and setting the size of the textbox
 *
 *@author Youssef Madkour
 */
echo $this->Form->input('Start date (dd/mm/yyyy)', array('type' => 'text',
                                            'id' => 'datepicker','style' => 'width:150px'));
	  
?>


<?php
/*
 *Description of the line echo $this->Form->input('End date (dd/mm/yyyy)', array('type' => 'text',
                                            'id' => 'datepicker1','style' => 'width:150px'));
 *
 *adding datepicker to the textbox and setting the size of the textbox
 *
 *@author Youssef Madkour
 */
echo $this->Form->input('End date (dd/mm/yyyy)', array('type' => 'text',
                                            'id' => 'datepicker1','style' => 'width:150px'));
	  
?>
<?php
$options=array('T'=>'Tweets','M'=>'Mentions');
$attributes=array('legend'=>false,'default'=> 'T');
echo $this->Form->radio('type',$options,$attributes);
?>



<h4> search by text:</h4>
<?php

echo $this->Form->input('text', array('type' => 'text',
                                            'style' => 'width:150px'));

										
?>




<?php
echo $this->Form->end('filter');
?>
<?php
if($result != NULL){
?>
<table>
	<?php
 foreach($result as $account): ?>
 <tr>
   
<td>

<?php  echo $this->Html->link($account['Post']['text'],array('controller'=>'posts','action'=>'tweetreplies',$account['Post']['postID']));?>

 </td>
 
 <td>
 <?php
                    echo $this->Html->link($this->Html->image('delete.png', array(
                                'alt' => 'Delete Tweet')
                            ), array(
                        'action' => 'deleteTweets',
                        $account['Post']['postID']
                            ), array(
                        'escape' => false,
                        'confirm' => 'Are you sure about deleting this tweet?'
                    ));
                    ?>
 </td>
   
 </tr>
<?php endforeach; ?>
</table>
<?php }?>